package com.nineclock.attendance.controller;

import com.nineclock.attendance.dto.AttendPunchDTO;
import com.nineclock.attendance.service.AttendPunchService;
import com.nineclock.common.entity.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "考勤打卡接口管理", tags = "考勤服务")
@RestController
public class AttendPunchController {
    @Autowired
    private AttendPunchService attendPunchService;
    /**
     * 接口名称：考勤: 移动端打卡
     * 接口路径：POST/atte/punch
     */
    @PostMapping("punch")
    @ApiOperation(value = "打卡: 移动端打卡")
    public Result punch(@RequestBody AttendPunchDTO attendPunchDTO){
        attendPunchService.punch(attendPunchDTO);
        return Result.success();
    }
}
